package com.daltonsoft.daxc.db;

import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

public class DatabaseManager {

	String dbName;

	public DatabaseManager(String dbName) {
		this.dbName = dbName;
	}

	public void execSQL(String sql) {
		SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbName, null);
		db.execSQL(sql);
		db.close();
	}

	public Cursor rawQuery(String sql) {
		SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbName, null);
		Cursor c = db.rawQuery(sql, null);
		// db.close();
		return c;
	}
}
